package com.yll.service;

import com.github.pagehelper.PageInfo;
import com.yll.domain.Student;
import com.yll.domain.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface UserService {
    //登录功能
    @Transactional(readOnly = true)
    User findByUsernameAndPassword(String username, String password);

    //添加功能
    @Transactional
    void add(Student student);

    //分页查询
    @Transactional(readOnly = true)
    PageInfo<Student> pageQuery(Integer page, Integer pageSize);

    //根据ID查询
    @Transactional(readOnly = true)
    Student findById(Integer id);
}
